#include <iostream>
#include <string>
#include <vector>
using namespace std;

class Solution
{
public:
    string modifyString(string s)
    {
        for(int i=0; i<s.size(); i++)
        {
            if(s[i]=='?')
            {
                for(char j='a'; j<='z'; j++)
                {
                    bool left = i==0 || s[i-1] != j;
                    bool right = i==s.size()-1 || s[i+1] != j;
                    if(left && right)
                    {
                        s[i] = j;
                        break;
                    }
                }
            }
        }
        return s;
    }
};
